# -*- coding: utf-8 -*-
from django.conf.urls import url

from course import views

urlpatterns = [
    #==========================培训课程=====================================
    url(r'^course/(?P<pk>.*)', views.TrainCourseView.as_view({"get":"get_course_details","post":"update","delete":"destroy"})),  #用于获取授权认证token
    url(r'^courses/', views.TrainCourseView.as_view({"get":"list","post":"create", 'put': 'update', "delete":"destroy"})),
    # 模糊查询
    url('is_like_course/$',
        views.TrainCourseView.as_view({'get': 'search_train_courses'})),
    # 生成培训课程模板
    url(r'^download/', views.TrainCourseDownLoadView.as_view({'post': 'generate_train_courses', 'delete': 'destroy', 'put': 'generate_template'})),
    # xlsx批量导入培训课程数据，解析入库
    url('import/',
        views.TrainCourseImportView.as_view({'post': 'import_from_excel', 'delete': 'destroy', 'put': 'update'})),
    # 考前培训
    url('pre_exam_train_course/',
        views.ProExamTrainCourseView.as_view({'put': 'pre_exam_train', 'post': 'create_pre_exam_train_course'})),
    # 考前培训
    url('my_course/',
        views.MyCourseView.as_view({'get': 'list'})),
    url('title_course/',
        views.TitleView.as_view({'get': 'list'})),
]
